from dataclasses import dataclass
a = 'sdjflsd12'
b = a[-2:-1]
print(b)
c = a[-1:]
print(c)
d = a[-8:-4]
print(d)

dict1 = {
    'a':111,
    'd':434,
    'c':84
}
person1 = {
    'name': 'sss',
    'age': 22,
    'sex': 'man',
    'parm':{'a':'ddd','c':'ddd'}
}
@dataclass
class person:
    name: str
    age: int
    sex: str
    parm: dict

p1 = person(**person1)
print(p1)
print(type(p1.parm))